<extend name="Public/base" />

<block name="body">
<!-- <link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all"> -->
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
<script type="text/javascript" src="__STATIC__/provincecityarea/jquery-1.7.min.js"></script>
    <div class="main-title cf">
        <h2>查看 [推广员信息]</h2>
    </div>
    <!-- 标签页导航 -->
<div class="tab-wrap">
    <ul class="tab-nav nav">
		<li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息</a></li></li>
        <li data-tab="tab2" ><a href="javascript:void(0);">结算信息</a></li>
    </ul>
    <div class="tab-content zc_for">
    <!-- 表单 -->
    <form id="form" action="{:U('edit?model='.$model['id'])}" method="post" class="form-horizontal">
        <!-- 基础文档模型 -->
        <div id="tab1" class="tab-pane in tab1 tab-look">
            <table  border="0" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td class="l">登陆账号：</td>
                        <td class="r">
                           <input type="text" class="txt" name="account" value="{$data['account']}" disabled="disabled">
                        </td>
                        <td class="l">登陆密码：</td>
                        <td class="r">
                           <input type="text" class="txt time" name="password" value="">
                        </td>
                    </tr>
                    <tr>
                        <td class="l">真实姓名：</td>
                        <td class="r">
                           <input type="text" class="txt" name="real_name" value="{$data['real_name']}" disabled="disabled">
                        </td>
                      <td class="l">手机号码：</td>
                        <td class="r">
                           <input type="text" class="txt" name="mobile_phone" value="{$data['mobile_phone']}" disabled="disabled">
                        </td> 
                    </tr>
                    <tr>
                        <td class="l">渠道等级</td>
                        <td class="r">
                           <input type="text" class="txt" name="parent_id" value="{:get_qu_promote($data['parent_id'])}" disabled="disabled">
                        </td>
                        <td class="l">上线渠道</td>
                        <td class="r">
                           <input type="text" class="txt" name="parent_id" value="{:get_top_promote($data['id'],$data['parent_id'])}" disabled="disabled">
                        </td>
                    </tr>
                    <tr>
                    <tr>
                     <td class="l">所属管理员：</td>
                        <td class="r">
                        <if condition="$data.parent_id eq 0">
                           <select name="admin" id="admin">
                            <option value="0">请选择管理员</option>
                            <volist name=":get_admin_list()" id="vo">
                            <option value="{$vo.uid}">{$vo.nickname}</option>
                            </volist>
                           </select>
                        <else/>
                            <input type="text" class="txt" name="admin_nickname" value="{:get_admin_nickname_($data['parent_id'],$data['admin_id'])}" disabled="disabled">
                        </if>
                        </td>
                        <td class="l">账号状态：</td>
                        <td class="r">
                            <label class="inp_radio" >
                                <input type="radio" disabled="disabled" class="inp_radio" value="0" name="status" <eq name="data['status']"  value="0">checked="checked"</eq>>未审核
                                <input type="radio" disabled="disabled" class="inp_radio" value="1" name="status" <eq name="data['status']" value="1">checked="checked"</eq>>正常
                                <input type="radio" disabled="disabled" class="inp_radio" value="2" name="status" <eq name="data['status']" value="2">checked="checked"</eq>>拉黑
                            </label>
                        </td>
                    </tr>

                        <td class="l">最后登录状态</td>
                        <td class="r">
                           <input type="text" class="txt" name="last_login_time" value="{:set_show_time($data['last_login_time'])}" disabled="disabled">
                        </td>
                        <td class="l">二级密码：</td>
                        <td class="r">
                           <input type="text" class="txt time" name="second_pwd" value="">
                        </td>
                    </tr>
                    <tr>
                        <td class="l">备注</td>
                        <td class="r" colspan='3'>
                        <textarea name="mark1" class="txt_area1">{$data['mark1']}</textarea>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="tab3" class="tab-pane  tab2 tab-look">
            <table  border="0" cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                    <td class="l">结算联系人</td>
                    <td class="r">
                       <input type="text" class="txt" name="real_name" value="{$data['real_name']}" disabled="disabled">
                    </td>
                    <td class="l">结算电话</td>
                    <td class="r">
                       <input type="text" class="txt" name="mobile_phone" value="{$data['mobile_phone']}" disabled="disabled">
                    </td>
                </tr>
                <tr>
                    <td class="l">开户城市</td>
                    <td class="r1">
                            <div class="info">
                                <div>
                                <select id="s_province" name="s_province" disabled="disabled"></select>  
                                <select id="s_city" name="s_city" disabled="disabled"></select>  
                                <select id="s_county" name="s_county" disabled="disabled"></select>
                                <script class="resources library" src="area.js" type="text/javascript"></script>
                                
                                <script type="text/javascript">
                                    var pro="{:$data['bank_area']['0']}";
                                    var city="{:$data['bank_area']['1']}";
                                    var are="{:$data['bank_area']['2']}";
                                    _init_area(pro,city,are);</script>
                                </div>
                                <div id="show"></div>
                            </div>
                            <script type="text/javascript">
                                var Gid  = document.getElementById ;
                                var showArea = function(){
                                    Gid('show').innerHTML = "<h3>省" + Gid('s_province').value + " - 市" +    
                                    Gid('s_city').value + " - 县/区" + 
                                    Gid('s_county').value + "</h3>"
                                                            }
                                Gid('s_county').setAttribute('onchange','showArea()');
                            </script>
                      <!--  <select id="seachprov" name="seachprov" width="100px" onChange="changeComplexProvince(this.value, sub_array, 'seachcity', 'seachdistrict');" disabled="disabled"></select>&nbsp;
                        <select id="seachcity" name="homecity" onChange="changeCity(this.value,'seachdistrict','seachdistrict');" disabled="disabled"></select>&nbsp;
                        <span id="seachdistrict_div"><select id="seachdistrict" name="seachdistrict" disabled="disabled"></select></span> -->
                        <!-- <input type="hidden" id="bank_area" name="bank_area"> -->
                    </td>
                    <td class="l">收款银行</td>
                    <td class="r">
                       <input type="text" class="txt" name="bank_name" value="{$data['bank_name']}" disabled="disabled">
                    </td>
                </tr>
                <tr>
                    <td class="l">开户网点</td>
                    <td class="r">
                       <input type="text" class="txt" name="account_openin" value="{$data['account_openin']}" disabled="disabled">
                    </td>
                    <td class="l">银行户名</td>
                    <td class="r">
                       <input type="text" class="txt" name="bank_account" value="{$data['bank_account']}" disabled="disabled">
                    </td>
                </tr>
                <tr>
                    <td class="l">银行卡号</td>
                    <td class="r">
                       <input type="text" class="txt" name="bank_card" value="{$data['bank_card']}" disabled="disabled">
                    </td>
                    <td class="l"></td>
                    <td class="r">
                    </td>
                </tr>
                <tr>
                        <td class="l">备注</td>
                        <td class="r" colspan='3'>
                        <textarea name="mark2" class="txt_area1">{$data['mark2']}</textarea>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="form-item cf">
            <input type='hidden' name="id" value="{$data['id']}" />
            <button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <a class="btn btn-return" href="javascript:history.back(-1);">返 回</a>
        </div>
    </form>
    </div>
</div>
</block>

<block name="script">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Promote/lists')}');
Think.setValue("game_type_id", {$data.game_type_id|default = 0});
Think.setValue("category", {$data.category|default = 0});
Think.setValue("admin", {$data.admin_id|default = 0});
$('#submit').click(function(){
    $('#form').submit();
});
$(function(){
    // var pro="{:$data['bank_area']['0']}";
    // alert (pro);
    showTab();
    prov="{:substr($data['bank_area'],0,2)}";
    city="{:substr($data['bank_area'],2,2)}";
    ciarea="{:substr($data['bank_area'],4,2)}";
    initComplexArea('seachprov', 'seachcity', 'seachdistrict', area_array, sub_array, prov, city, ciarea);
});
// //得到地区码
// function getAreaID(){
//     var area = 0;          
//     if($("#seachdistrict").val() != "0"){
//         area = $("#seachdistrict").val();                
//     }else if ($("#seachcity").val() != "0"){
//         area = $("#seachcity").val();
//     }else{
//         area = $("#seachprov").val();
//     }
//     return area;
// }


// //根据地区码查询地区名
// function getAreaNamebyID(areaID){
//     var areaName = "";
//     if(areaID.length == 2){
//         areaName = area_array[areaID];
//     }else if(areaID.length == 4){
//         var index1 = areaID.substring(0, 2);
//         areaName = area_array[index1] + " " + sub_array[index1][areaID];
//     }else if(areaID.length == 6){
//         var index1 = areaID.substring(0, 2);
//         var index2 = areaID.substring(0, 4);
//         areaName = area_array[index1] + " " + sub_array[index1][index2] + " " + sub_arr[index2][areaID];
//     }
//     return areaName;
// }
</script>
</block>

